const express = require('express')
const proxy = require('http-proxy-middleware')
const app = express()
app.use(express.static(__dirname + '/'))

//反向代理
app.use('/api',proxy({
    target:'http://localhost:4000',
    changeOrigin:false
}))

app.listen(3000)